﻿@model GameSchool.Models.dbLINQ.LevelModel

<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<div>
    @using (Html.BeginForm()) {
        @Html.ValidationSummary(true)
        <fieldset>
            <legend>Notaðu formið að neðan til að búa til nýtt borð</legend>

            @Html.HiddenFor(model => model.ID)
            @Html.HiddenFor(model => model.CourseID)
            @Html.HiddenFor(model => model.NumberInCourse)

            <div class="editor-label">
                @Html.Label("Nafn")
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Name)
                @Html.ValidationMessageFor(model => model.Name)
            </div>

            <div class="editor-label">
                @Html.Label("Lýsing")
            </div>
            <div class="editor-field">
                @Html.TextAreaFor(model => model.Description)
                @Html.ValidationMessageFor(model => model.Description)
            </div>

            <p>
                <input type="submit" value="Save" />
            </p>
        </fieldset>
    }

    <div>
        @Html.ActionLink("Til baka", "GetCourse", new { id = Model.CourseID })
    </div>
</div>